-- GENERATED SPELL FOR [Scarlet Neophyte] --


function spell0_1539(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1539', 0, 1)
end

function spell1_1539(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(13322,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1539', 5000, 1)
end

function Sorts_1539(pUnit, Event)
local choix_sorts_1539 = math.random(0, 1)
if choix_sorts_1539 == 0 then
pUnit:RegisterEvent('spell0_1539', 1, 1)
end
if choix_sorts_1539 == 1 then
pUnit:RegisterEvent('spell1_1539', 1, 1)
end
end

function mob1539_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1539', math.random(1500, 3000), 1)
end

function mob1539_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1539_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1539_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1539, 1, 'mob1539_Action')
RegisterUnitEvent(1539, 2, 'mob1539_Leave')
RegisterUnitEvent(1539, 3, 'mob1539_Kill')
RegisterUnitEvent(1539, 4, 'mob1539_Die')
